﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using System.Collections.Generic;
using System.Xml;
using ServBus.ListForm2013.Utility;
using System.IO;

namespace ServBus.ListForm2013.ListFormWFWebPart
{
    [ToolboxItemAttribute(false)]
    public class ListFormWFWebPart : WebPart
    {
        // 当更改可视 Web 部件项目项时，Visual Studio 可能会自动更新此路径。
        //private const string AscxPath = @"~/_CONTROLTEMPLATES/ServBus.ListForm2013/ListFormWFWebPart/ListFormWFWebPartUserControl.ascx";
        private const string AscxPath = @"~/_CONTROLTEMPLATES/15/ServBus.ListForm2013/ListFormWFWebPart/ListFormWFWebPartUserControl.ascx";
        
        protected override void CreateChildControls()
        {
            ListFormWFWebPartUserControl control = Page.LoadControl(AscxPath) as ListFormWFWebPartUserControl;
            if (control != null)
            {
                control.webpart = this;
            }
            if (control != null) Controls.Add(control);
        }



       
    }



   
}
